package com.kunpan.admin.service;

import com.kunpan.admin.common.domain.AjaxResult;
import com.kunpan.admin.entity.RegisterBody;
import com.kunpan.admin.entity.User;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

public interface UserService {
    AjaxResult login(String email, String password, HttpServletRequest request);

    String register(RegisterBody registerBody);

    Integer selectUserIdByEmail(String email);

    AjaxResult updateUserInfo(User user);

    AjaxResult selectUserById(Integer userId);

    int resetUserPwd(Integer userId, String newPassword);

    AjaxResult refreshToken(Map<String, String> tokenBody, HttpServletRequest request);

    AjaxResult logout(HttpServletRequest request);

    AjaxResult getFreeSpace();

    AjaxResult updateAvatar(MultipartFile file,String fileMd5);

    AjaxResult forgetPassword(String email, String password);
}
